package filetest;

import java.io.*;

/**
 * Created with IntelliJ IDEA.
 * User: leep
 * Date: 16-3-3
 * Time: 上午10:42
 * To change this template use File | Settings | File Templates.
 */
public class FileMain {

	public static void main(String[] args) throws IOException {
		File a = new File("D:/product/test/src/filetest/a.txt");
		BufferedWriter writer = new BufferedWriter(new FileWriter(a, true));
		writer.write("12345645645");
		writer.close();
		BufferedReader reader = new BufferedReader(new FileReader(a));
		String s = "";
		String c = "";
		while ((s = reader.readLine()) != null) {
			c += s;
		}
		reader.close();
		System.out.println(c);
	}
}
